chore: More logs for common#259
Conversation
Reviewer's GuideThis PR enriches and unifies debug logging across the calendar-common module by replacing ServiceLogger targets with a CommonLogger, adding necessary commondef includes, and inserting detailed qCDebug/qCWarning calls at key code paths. Many non-critical logs have been added as commented placeholders for future activation. Class diagram for updated logging in calendar-commonclassDiagram
class DAccount {
+DAccount(Type type)
+setAccountID(QString accountID)
+setDbusInterface(QString dbusInterface)
+setAccountState(AccountStates accountState)
+fromJsonString(Ptr &account, const QString &jsonStr)
+toJsonListString(const DAccount::List &accountList, QString &jsonStr)
+fromJsonListString(List &accountList, const QString &jsonStr)
+syncFreqToJsonString(const DAccount::Ptr &account)
+syncFreqFromJsonString(const DAccount::Ptr &account, const QString &syncFreqStr)
<<uses CommonLogger for debug and warning logs>>
}
class DScheduleType {
+setDeleted(int deleted)
+fromJsonString(DScheduleType::Ptr &scheduleType, const QString &jsonStr)
+toJsonString(const DScheduleType::Ptr &scheduleType, QString &jsonStr)
+fromJsonListString(DScheduleType::List &stList, const QString &jsonStr)
+toJsonListString(const DScheduleType::List &stList, QString &jsonStr)
<<uses CommonLogger for debug and warning logs>>
}
class DSchedule {
+DSchedule()
+DSchedule(const DSchedule &schedule)
+setAlarmType(const DSchedule::AlarmType &alarmType)
+setRRuleType(const DSchedule::RRuleType &rtype)
+fromJsonString(DSchedule::Ptr &schedule, const QString &json)
+toJsonString(const DSchedule::Ptr &schedule, QString &json)
<<uses CommonLogger for debug and warning logs>>
}
class DTypeColor {
+DTypeColor()
+DTypeColor(const DTypeColor &typeColor)
+fromJsonString(const QString &colorJson)
+toJsonString(const DTypeColor::List &colorList)
<<uses CommonLogger for debug logs>>
}
class DBusTimedate {
+DBusTimedate(QObject *parent)
+shortTimeFormat()
+shortDateFormat()
+weekBegins()
+propertiesChanged(const QDBusMessage &msg)
+getPropertyByName(const char *porpertyName)
+getHasDateTimeFormat()
<<uses CommonLogger for debug and warning logs>>
}
class LunarDateInfo {
+getRRuleStartDate(const QDate &beginDate, const QDate &endDate, const QDate &solarDate)
+getAllNextMonthLunarDayBySolar(const QDate &solarDate)
+getAllNextYearLunarDayBySolar(const QDate &solarDate)
+ParseRRule(const QString &rule)
+addSolarMap(QMap<int, QDate> &solarMap, QDate &nextDate, int &count, const int addDays)
<<uses CommonLogger for debug and warning logs>>
}
class LunarCalendar {
+LogOffEmptyData()
<<uses CommonLogger for debug logs>>
}
class pinyinsearch {
+pinyinsearch()
+getPinPinSearch()
+CreatePinyin(const QString &zh)
+initDict()
<<uses CommonLogger for debug and warning logs>>
}
class DDE_Calendar {
+getNewTypeIDByOldTypeID(int oldTypeID)
+getOldTypeIDByNewTypeID(const QString &newTypeID)
+getExternalSchedule(const DSchedule::Map &scheduleMap)
+setAlarmByOldRemind(const DSchedule::Ptr &schedule, const QString &remind)
+getOldRemindByAlarm(const DSchedule::AlarmType &alarmType)
+getScheduleByExported(const QString &scheduleStr)
+setRRuleByOldRRule(const DSchedule::Ptr &schedule, const QString &rrule)
+setExDate(const DSchedule::Ptr &schedule, const QJsonArray &ignore)
<<uses CommonLogger for debug and warning logs>>
}
class CaLunarDayInfo {
+registerMetaType()
<<uses CommonLogger for debug logs>>
}
class CaHuangLiDayInfo {
+toJson()
+strJsonToInfo(const QString &strJson, bool &isVaild)
+jsonObjectToInfo(const QJsonObject &jsonObject)
<<uses CommonLogger for debug logs>>
}
class CaHuangLiMonthInfo {
+toJson()
+strJsonToInfo(const QString &strJson, bool &isVaild)
+clear()
<<uses CommonLogger for debug logs>>
}
class DScheduleQueryPar {
+DScheduleQueryPar()
+fromJsonString(const QString &queryStr)
+toJsonString(const DScheduleQueryPar::Ptr &queryPar)
<<uses CommonLogger for debug and warning logs>>
}
class Units {
+getHomeConfigPath()
+DownloadFile(QString url, QString filename)
<<uses CommonLogger for debug logs>>
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note
详情{
"calendar-common/src/lunarandfestival/method_interface.cpp": [
{
"line": " return TianGan[num % 10] + DiZhi[num % 12];",
"line_number": 84,
"rule": "C151",
"reason": "政治敏感词 | 8503710310"
}
]
} |
|
Warning
|
|
Warning
|
|
Note
详情{
"calendar-common/src/lunarandfestival/method_interface.cpp": [
{
"line": " return TianGan[num % 10] + DiZhi[num % 12];",
"line_number": 84,
"rule": "C151",
"reason": "政治敏感词 | 8503710310"
}
]
} |
|
Warning
|
|
Note
详情{
"calendar-common/src/lunarandfestival/method_interface.cpp": [
{
"line": " return TianGan[num % 10] + DiZhi[num % 12];",
"line_number": 84,
"rule": "C151",
"reason": "政治敏感词 | 8503710310"
}
]
} |
Add more logs for common. Log: More logs for common.
|
Warning
|
deepin pr auto review关键摘要:
是否建议立即修改: |
|
Note
详情{
"calendar-common/src/lunarandfestival/method_interface.cpp": [
{
"line": " return TianGan[num % 10] + DiZhi[num % 12];",
"line_number": 84,
"rule": "C151",
"reason": "政治敏感词 | 8503710310"
}
]
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, re2zero The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
a594251
into
linuxdeepin:develop/snipe
Add more logs for common.
Log: More logs for common.
Summary by Sourcery
Enhance observability in calendar-common by adding pervasive debug logging using CommonLogger, consolidating log sources, and improving traceability of key operations.
Enhancements: